#include <stdio.h>
#include <time.h>
#include "func_times.h"
void func_times(void)
{
    printf("Times function called\n");
}

// 获取毫秒级时间戳 (UNIX时间戳+毫秒)
uint64_t func_time_get_pts_ms(void)
{
    struct timespec ts;
    clock_gettime(CLOCK_MONOTONIC, &ts);
    return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000;
}

// 获取微秒级时间戳 (UNIX时间戳+微秒)
uint64_t func_time_get_pts_us(void)
{
    struct timespec ts;
    clock_gettime(CLOCK_MONOTONIC, &ts);
    return (uint64_t)ts.tv_sec * 1000000 + (uint64_t)ts.tv_nsec / 1000;
}
